<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="{{ROOT}}assets/css/ui.css" />
    <link rel="stylesheet" href="{{ROOT}}assets/css/public.css" />
    <script src="{{ROOT}}assets/js/jquery.min.js"></script>
    <link rel="shortcut icon" href="http://www.tsdy.club/a.png" type="image/x-icon">
    <style>
        * {
            padding: 0;
            margin: 0;
        }
    </style>
</head>

<body class="position-relative">
    {% include "public/header.njk" %}
    <main>
        <div class="px-md-4 px-lg-5 pt-3 color-bg-subtle">
            <div class="container-xl d-flex mb-3">
                <h1 class="d-flex flex-items-center f3 text-normal">
                    <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16"
                        data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2">
                        <path fill-rule="evenodd"
                            d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z">
                        </path>
                    </svg>
                    <nav aria-label="Breadcrumb">
                        <ol>
                            <li class="breadcrumb-item">
                                <a href="{{ROOT}}{{ user.username }}">{{ user.username }}</a>
                            </li>
                            <li class="breadcrumb-item breadcrumb-item-selected text-bold">
                                <a href="{{ROOT}}{{ user.username + '/' + repo.name }}">{{ repo.name }}</a>
                            </li>
                        </ol>
                    </nav>
                </h1>
                <div class="d-flex flex-0"></div>
            </div>
            <nav class="UnderlineNav mt-3 position-sticky top-0" aria-label="Foo bar">
                <div class="UnderlineNav-body">
                    <a class="UnderlineNav-item" href="#url" aria-current="page">
                        <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16"
                            data-view-component="true"
                            class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline">
                            <path fill-rule="evenodd"
                                d="M4.72 3.22a.75.75 0 011.06 1.06L2.06 8l3.72 3.72a.75.75 0 11-1.06 1.06L.47 8.53a.75.75 0 010-1.06l4.25-4.25zm6.56 0a.75.75 0 10-1.06 1.06L13.94 8l-3.72 3.72a.75.75 0 101.06 1.06l4.25-4.25a.75.75 0 000-1.06l-4.25-4.25z">
                            </path>
                        </svg>
                        <span>Code</span>
                    </a>
                </div>
            </nav>
        </div>
        <div class="Layout Layout--sidebarPosition-end container-xl pt-5 px-md-4 px-lg-5">
            <div class="Layout-main px-2">
                {% if repo.is_empty_repo %}
                {% include "repo/empty.njk" %}
                {% elif type === "tree" %}
                {% include "repo/tree.njk" %}
                {% else %}
                {% include "repo/blob.njk" %}
                {% endif %}
            </div>
            {# 只有是文件列表，且仓库存在时，才显示侧边栏 #}
            {% if type === 'tree' and repo.is_empty_repo === false %}
            <div class="Layout-sidebar px-2">
                {% include "repo/sidebar.njk" %}
            </div>
            {% endif %}
        </div>
    </main>
    {% include "public/footer.njk" %}
</body>

</html>